<template>
    <div>
        <el-button type="success" @click="add">测试2</el-button>
        <el-pagination :current-page="currentPage4" @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[100, 200, 300, 400]" :page-size="100" layout="total, sizes, prev, pager, next, jumper" :total="400">
        </el-pagination>
    </div>
</template>

<script lang="ts">
import { ref, defineComponent } from 'vue';
import { useRouter } from 'vue-router';
export default defineComponent({
    name: 'b',
    setup() {
        const route = useRouter();
        const currentPage4 = ref(4);
        const handleSizeChange = (val: any) => {
            console.log(`每页 ${val} 条`);
        };
        const handleCurrentChange = (val: any) => {
            console.log(`当前页: ${val}`);
        };
        const add = () => {
            console.log(1);
            route.push('/home');
        };
        return {
            route,
            currentPage4,
            handleSizeChange,
            handleCurrentChange,
            add
        };
    }
});
</script>
